#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct UndirectedGraph {
    int totalVertices;
    int totalEdges;

    struct adjacency {
        int length;
        int capacity;
        int list[];
    } *adjacencyList[];

} *UndirectedGraphPtr;

UndirectedGraphPtr createUndirectedGraph(int totalVertices);

void destroyUndirectedGraph(UndirectedGraphPtr graph);

void ugraphAddEdge(UndirectedGraphPtr graph, int src, int dest);

void _ugraphAddEdge(UndirectedGraphPtr graph, int src, int dest);

void printUgraphDfs(UndirectedGraphPtr graph, int vertex);

void ugraphDfs(UndirectedGraphPtr graph, int visited[], int vertex);